package cn.formaggie.dao;

import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RolePermissionDao {

    Boolean hasRolePermissionItem(@Param("roleId") Integer roleId,@Param("permissionId")Integer permissionId);

    List<Integer> getPermissionIdOfRole(Integer roleId);

    Integer addRolePermissionItem(@Param("roleId") Integer roleId,@Param("permissionId")Integer permissionId);

    Integer deleteRolePermissionItem(@Param("roleId") Integer roleId,@Param("permissionId")Integer permissionId);

    Integer deleteAllPermissionForRole(Integer roleId);

}
